package com.xsd.iterator;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * @Description: 信息学院
 * @Author: zhoufuzong
 * @Created: 2021-03-06 19:50:21
 * @Version: 1.1.0
 */

public class InfoCollege implements College {
    List<Department> departmentList;

    public InfoCollege() {
        departmentList=new ArrayList<>();
        departmentList.add(new Department("信息安全专业","信息安全"));
        departmentList.add(new Department("网络安全专业","网络安全"));
        departmentList.add(new Department("系统安全专业","系统安全"));

    }

    @Override
    public String getName() {
        return "信息工程学院";
    }

    @Override
    public void addDepartment(String name, String desc) {
        Department department = new Department(name,desc);
        departmentList.add(department);
    }

    @Override
    public Iterator createIterator() {
        return  new InfoCollegeIterator(departmentList);
    }
}
